cs-apolo-sapi
π API Documentation - cs-apolo-sapi
This section describes the attributes and usage of the cs-apolo-sapi service.
ποΈ Base Information
- API Title: cs-apolo-sapi
- Version: 1.0.0
- Base URL:
https://cs-apolo-sapi-v1-{env}.us-e1.cloudhub.io/api/
Replace the environment segment with: dev
(Development)qa
(Quality Assurance)
π Authentication
Required Headers
Header | Type | Description |
---|---|---|
client_id | String | Unique identifier for API clients |
invoker | String | JSON with caller information |
- client_id
- Length: 32 - 36 characters
- Example:
123e4567-e89b-12d3-a456-426614174000
- invoker
- Example:
{ "application": "Portal","addressIPUser": "192.168.80.13","loginUser": "User","userName": "User Name" }
- Example:
> π These headers are required in all requests.
π Endpoint: Create Dependent Worker
POST /create-dependent-worker
- Description: Creates a new dependent worker in the system.
Complete URL
https://cs-apolo-sapi-v1-dev.us-e1.cloudhub.io/api/create-dependent-worker
HTTP Method
POST
Required Headers
client_id: YOUR_CLIENT_ID
invoker: { "application": "Portal","addressIPUser": "192.168.80.13","loginUser": "User","userName": "User Name" }
Content-Type: application/json
Authentication
Client ID enforcement and oauth2
Request Body
{
"worker": {
"firstName": "Juan",
"lastName": "PΓ©rez",
"identificationType": "CC",
"identificationNumber": "1234567890",
"birthDate": "1985-06-15",
"gender": "M",
"email": "juan.perez@example.com",
"phone": "3107894561",
"address": "Calle 123 # 45-67",
"cityCode": "11001"
},
"contract": {
"consecutiveContract": "59",
"consecutiveHeadquarter": "483",
"workCenter": "1",
"salary": "1500000",
"position": "Analista",
"startDate": "2025-01-15",
"riskLevel": "2",
"workday": "D",
"epsCode": "EPS001",
"afpCode": "AFP001"
}
}
Example Request
curl -X POST "https://cs-apolo-sapi-v1-dev.us-e1.cloudhub.io/api/create-dependent-worker" \
-H "client_id: YOUR_CLIENT_ID" \
-H "invoker: { \"application\": \"Portal\",\"addressIPUser\": \"192.168.80.13\",\"loginUser\": \"User\",\"userName\": \"User Name\" }" \
-H "Content-Type: application/json" \
-d '{
"worker": {
"firstName": "Juan",
"lastName": "PΓ©rez",
"identificationType": "CC",
"identificationNumber": "1234567890",
"birthDate": "1985-06-15",
"gender": "M",
"email": "juan.perez@example.com",
"phone": "3107894561",
"address": "Calle 123 # 45-67",
"cityCode": "11001"
},
"contract": {
"consecutiveContract": "59",
"consecutiveHeadquarter": "483",
"workCenter": "1",
"salary": "1500000",
"position": "Analista",
"startDate": "2025-01-15",
"riskLevel": "2",
"workday": "D",
"epsCode": "EPS001",
"afpCode": "AFP001"
}
}'
Example Response
{
"status": "SUCCESS",
"code": "200",
"message": "Dependent worker created successfully",
"data": {
"workerConsecutive": "7845623",
"identificationNumber": "1234567890",
"identificationType": "CC",
"contractConsecutive": "59",
"affiliationDate": "2025-01-15T00:00:00Z"
}
}
β οΈ Error Codes
Code | Description | Suggested Solution |
---|---|---|
400 | Bad Request | Check request syntax and parameters. |
401 | Unauthorized | Validate authentication credentials. |
404 | Not Found | Confirm the endpoint URL. |
500 | Internal Server Error | Retry or contact technical support. |
π Support
For assistance, contact the Integration Services and Applications Coordination team.